/* Jison generated parser */
var parser = (function(){
var parser = {trace: function trace() { },
yy: {},
symbols_: {"error":2,"Program":3,"StatementList":4,"EOF":5,";":6,"Statement":7,"BEGIN":8,"END":9,"LABEL":10,"Exp":11,"If_Statement":12,"While_Statement":13,"GOTO":14,"LET":15,"IDENT":16,"=":17,"IF":18,"THEN":19,"ENDIF":20,"ELSE":21,"WHILE":22,"WEND":23,"NUM":24,"STR":25,"+":26,"CONCAT":27,"-":28,"*":29,"/":30,">":31,"<":32,">=":33,"<=":34,"<>":35,"(":36,")":37,"List":38,"INPUT":39,"PRINT":40,",":41,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",6:";",8:"BEGIN",9:"END",10:"LABEL",14:"GOTO",15:"LET",16:"IDENT",17:"=",18:"IF",19:"THEN",20:"ENDIF",21:"ELSE",22:"WHILE",23:"WEND",24:"NUM",25:"STR",26:"+",27:"CONCAT",28:"-",29:"*",30:"/",31:">",32:"<",33:">=",34:"<=",35:"<>",36:"(",37:")",39:"INPUT",40:"PRINT",41:","},
productions_: [0,[3,2],[4,2],[4,2],[4,3],[7,3],[7,4],[7,5],[7,4],[7,2],[7,1],[7,1],[7,1],[7,2],[7,4],[12,5],[12,7],[13,4],[11,1],[11,1],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,3],[11,1],[11,4],[11,3],[11,2],[11,2],[38,1],[38,3]],
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {

var $0 = $$.length - 1;
switch (yystate) {
case 1:$$[$0-1][1].root = true; return $$[$0-1];
break;
case 2:this.$ = $$[$0];
break;
case 3:this.$ = ["STLIST", {items:[$$[$0-1]]}];
break;
case 4:$$[$0-2][1].items.push($$[$0-1]); this.$ = $$[$0-2];
break;
case 5:this.$ = $$[$0-1];
break;
case 6:this.$ = $$[$0-1];
break;
case 7:this.$ = $$[$0-2];
break;
case 8:this.$ = $$[$0-2];
break;
case 9:$$[$0][1].label = $$[$0-1]; this.$ = $$[$0];
break;
case 10:this.$ = ["ST_EXP", {exp:$$[$0]}];
break;
case 11:this.$ = $$[$0];
break;
case 12:this.$ = $$[$0];
break;
case 13:this.$ = ["ST_GOTO", {dest:$$[$0]}];
break;
case 14:this.$ = ["ST_LET", {l:["VAR", {name:$$[$0-2]}], r:$$[$0]}];
break;
case 15:this.$ = ["ST_IF", {cond:$$[$0-3], then:$$[$0-1]}];
break;
case 16:this.$ = ["ST_IF", {cond:$$[$0-5], then:$$[$0-3], else:$$[$0-1]}];
break;
case 17:this.$ = ["ST_WHILE", {cond:$$[$0-2], body:$$[$0-1]}];
break;
case 18:this.$ = ["INT", {value:parseInt($$[$0])}];
break;
case 19:this.$ = ["STR", {value:String($$[$0])}];
break;
case 20:this.$ = ["ADD", {l:$$[$0-2], r:$$[$0]}];
break;
case 21:this.$ = ["CONCAT", {l:$$[$0-2], r:$$[$0]}];
break;
case 22:this.$ = ["SUB", {l:$$[$0-2], r:$$[$0]}];
break;
case 23:this.$ = ["MUL", {l:$$[$0-2], r:$$[$0]}];
break;
case 24:this.$ = ["DIV", {l:$$[$0-2], r:$$[$0]}];
break;
case 25:this.$ = ["EQ", {l:$$[$0-2], r:$$[$0]}];
break;
case 26:this.$ = ["GT", {l:$$[$0-2], r:$$[$0]}];
break;
case 27:this.$ = ["LT", {l:$$[$0-2], r:$$[$0]}];
break;
case 28:this.$ = ["GE", {l:$$[$0-2], r:$$[$0]}];
break;
case 29:this.$ = ["LE", {l:$$[$0-2], r:$$[$0]}];
break;
case 30:this.$ = ["NE", {l:$$[$0-2], r:$$[$0]}];
break;
case 31:this.$ = $$[$0-1];
break;
case 32:this.$ = ["VAR", {name:$$[$0]}];
break;
case 33:this.$ = ["CALL", {func:$$[$0-3], args:$$[$0-1]}];
break;
case 34:this.$ = ["CALL", {func:$$[$0-2]}];
break;
case 35:this.$ = ["CALL", {func:"INPUT", args:["LIST", {items:[$$[$0]]}]}];
break;
case 36:this.$ = ["CALL", {func:"PRINT", args:$$[$0]}];
break;
case 37:this.$ = ["LIST", {items:[$$[$0]]}];
break;
case 38:$$[$0-2][1].items.push($$[$0]); this.$ = $$[$0-2];
break;
}
},
table: [{3:1,4:2,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{1:[3]},{5:[1,20],7:21,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{4:22,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[1,23]},{4:24,6:[1,25],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{7:26,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,10],17:[1,32],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37]},{6:[2,11]},{6:[2,12]},{10:[1,38]},{16:[1,39]},{6:[2,18],8:[2,18],10:[2,18],14:[2,18],15:[2,18],16:[2,18],17:[2,18],18:[2,18],19:[2,18],22:[2,18],24:[2,18],25:[2,18],26:[2,18],27:[2,18],28:[2,18],29:[2,18],30:[2,18],31:[2,18],32:[2,18],33:[2,18],34:[2,18],35:[2,18],36:[2,18],37:[2,18],39:[2,18],40:[2,18],41:[2,18]},{6:[2,19],8:[2,19],10:[2,19],14:[2,19],15:[2,19],16:[2,19],17:[2,19],18:[2,19],19:[2,19],22:[2,19],24:[2,19],25:[2,19],26:[2,19],27:[2,19],28:[2,19],29:[2,19],30:[2,19],31:[2,19],32:[2,19],33:[2,19],34:[2,19],35:[2,19],36:[2,19],37:[2,19],39:[2,19],40:[2,19],41:[2,19]},{11:40,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,32],8:[2,32],10:[2,32],14:[2,32],15:[2,32],16:[2,32],17:[2,32],18:[2,32],19:[2,32],22:[2,32],24:[2,32],25:[2,32],26:[2,32],27:[2,32],28:[2,32],29:[2,32],30:[2,32],31:[2,32],32:[2,32],33:[2,32],34:[2,32],35:[2,32],36:[1,41],37:[2,32],39:[2,32],40:[2,32],41:[2,32]},{11:42,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:44,16:[1,15],24:[1,12],25:[1,13],36:[1,14],38:43,39:[1,16],40:[1,17]},{11:45,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:46,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{1:[2,1]},{6:[1,47]},{5:[2,2],6:[2,2],7:21,8:[1,5],9:[2,2],10:[1,6],11:7,12:8,13:9,14:[2,2],15:[2,2],16:[1,15],18:[2,2],20:[2,2],21:[2,2],22:[1,19],23:[2,2],24:[1,12],25:[1,13],36:[1,14],39:[2,2],40:[2,2]},{5:[2,3],6:[2,3],8:[2,3],9:[2,3],10:[2,3],14:[2,3],15:[2,3],16:[2,3],18:[2,3],20:[2,3],21:[2,3],22:[2,3],23:[2,3],24:[2,3],25:[2,3],36:[2,3],39:[2,3],40:[2,3]},{6:[1,49],7:21,8:[1,5],9:[1,48],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{4:50,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,9]},{11:51,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:52,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:53,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:54,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:55,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:56,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:57,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:58,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:59,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:60,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{11:61,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,13]},{17:[1,62]},{17:[1,32],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37],37:[1,63]},{11:44,16:[1,15],24:[1,12],25:[1,13],36:[1,14],37:[1,65],38:64,39:[1,16],40:[1,17]},{6:[2,35],8:[2,35],10:[2,35],14:[2,35],15:[2,35],16:[2,35],17:[1,32],18:[2,35],19:[2,35],22:[2,35],24:[2,35],25:[2,35],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37],36:[2,35],37:[2,35],39:[2,35],40:[2,35],41:[2,35]},{6:[2,36],8:[2,36],10:[2,36],14:[2,36],15:[2,36],16:[2,36],17:[2,36],18:[2,36],19:[2,36],22:[2,36],24:[2,36],25:[2,36],26:[2,36],27:[2,36],28:[2,36],29:[2,36],30:[2,36],31:[2,36],32:[2,36],33:[2,36],34:[2,36],35:[2,36],36:[2,36],37:[2,36],39:[2,36],40:[2,36],41:[1,66]},{6:[2,37],8:[2,37],10:[2,37],14:[2,37],15:[2,37],16:[2,37],17:[1,32],18:[2,37],19:[2,37],22:[2,37],24:[2,37],25:[2,37],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37],36:[2,37],37:[2,37],39:[2,37],40:[2,37],41:[2,37]},{17:[1,32],19:[1,67],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37]},{4:68,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],17:[1,32],18:[1,18],22:[1,19],24:[1,12],25:[1,13],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37],36:[1,14],39:[1,16],40:[1,17]},{5:[2,4],6:[2,4],8:[2,4],9:[2,4],10:[2,4],14:[2,4],15:[2,4],16:[2,4],18:[2,4],20:[2,4],21:[2,4],22:[2,4],23:[2,4],24:[2,4],25:[2,4],36:[2,4],39:[2,4],40:[2,4]},{6:[2,5]},{9:[1,69]},{6:[2,2],7:21,8:[1,5],9:[1,70],10:[1,6],11:7,12:8,13:9,14:[2,2],15:[2,2],16:[1,15],18:[2,2],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[2,2],40:[2,2]},{6:[2,20],8:[2,20],10:[2,20],14:[2,20],15:[2,20],16:[2,20],17:[2,20],18:[2,20],19:[2,20],22:[2,20],24:[2,20],25:[2,20],26:[2,20],27:[2,20],28:[2,20],29:[1,30],30:[1,31],31:[2,20],32:[2,20],33:[2,20],34:[2,20],35:[2,20],36:[2,20],37:[2,20],39:[2,20],40:[2,20],41:[2,20]},{6:[2,21],8:[2,21],10:[2,21],14:[2,21],15:[2,21],16:[2,21],17:[2,21],18:[2,21],19:[2,21],22:[2,21],24:[2,21],25:[2,21],26:[2,21],27:[2,21],28:[2,21],29:[1,30],30:[1,31],31:[2,21],32:[2,21],33:[2,21],34:[2,21],35:[2,21],36:[2,21],37:[2,21],39:[2,21],40:[2,21],41:[2,21]},{6:[2,22],8:[2,22],10:[2,22],14:[2,22],15:[2,22],16:[2,22],17:[2,22],18:[2,22],19:[2,22],22:[2,22],24:[2,22],25:[2,22],26:[2,22],27:[2,22],28:[2,22],29:[1,30],30:[1,31],31:[2,22],32:[2,22],33:[2,22],34:[2,22],35:[2,22],36:[2,22],37:[2,22],39:[2,22],40:[2,22],41:[2,22]},{6:[2,23],8:[2,23],10:[2,23],14:[2,23],15:[2,23],16:[2,23],17:[2,23],18:[2,23],19:[2,23],22:[2,23],24:[2,23],25:[2,23],26:[2,23],27:[2,23],28:[2,23],29:[2,23],30:[2,23],31:[2,23],32:[2,23],33:[2,23],34:[2,23],35:[2,23],36:[2,23],37:[2,23],39:[2,23],40:[2,23],41:[2,23]},{6:[2,24],8:[2,24],10:[2,24],14:[2,24],15:[2,24],16:[2,24],17:[2,24],18:[2,24],19:[2,24],22:[2,24],24:[2,24],25:[2,24],26:[2,24],27:[2,24],28:[2,24],29:[2,24],30:[2,24],31:[2,24],32:[2,24],33:[2,24],34:[2,24],35:[2,24],36:[2,24],37:[2,24],39:[2,24],40:[2,24],41:[2,24]},{6:[2,25],8:[2,25],10:[2,25],14:[2,25],15:[2,25],16:[2,25],17:[2,25],18:[2,25],19:[2,25],22:[2,25],24:[2,25],25:[2,25],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,25],32:[2,25],33:[2,25],34:[2,25],35:[2,25],36:[2,25],37:[2,25],39:[2,25],40:[2,25],41:[2,25]},{6:[2,26],8:[2,26],10:[2,26],14:[2,26],15:[2,26],16:[2,26],17:[2,26],18:[2,26],19:[2,26],22:[2,26],24:[2,26],25:[2,26],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],37:[2,26],39:[2,26],40:[2,26],41:[2,26]},{6:[2,27],8:[2,27],10:[2,27],14:[2,27],15:[2,27],16:[2,27],17:[2,27],18:[2,27],19:[2,27],22:[2,27],24:[2,27],25:[2,27],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],37:[2,27],39:[2,27],40:[2,27],41:[2,27]},{6:[2,28],8:[2,28],10:[2,28],14:[2,28],15:[2,28],16:[2,28],17:[2,28],18:[2,28],19:[2,28],22:[2,28],24:[2,28],25:[2,28],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],37:[2,28],39:[2,28],40:[2,28],41:[2,28]},{6:[2,29],8:[2,29],10:[2,29],14:[2,29],15:[2,29],16:[2,29],17:[2,29],18:[2,29],19:[2,29],22:[2,29],24:[2,29],25:[2,29],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],37:[2,29],39:[2,29],40:[2,29],41:[2,29]},{6:[2,30],8:[2,30],10:[2,30],14:[2,30],15:[2,30],16:[2,30],17:[2,30],18:[2,30],19:[2,30],22:[2,30],24:[2,30],25:[2,30],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],37:[2,30],39:[2,30],40:[2,30],41:[2,30]},{11:72,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,31],8:[2,31],10:[2,31],14:[2,31],15:[2,31],16:[2,31],17:[2,31],18:[2,31],19:[2,31],22:[2,31],24:[2,31],25:[2,31],26:[2,31],27:[2,31],28:[2,31],29:[2,31],30:[2,31],31:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],37:[2,31],39:[2,31],40:[2,31],41:[2,31]},{37:[1,73],41:[1,66]},{6:[2,34],8:[2,34],10:[2,34],14:[2,34],15:[2,34],16:[2,34],17:[2,34],18:[2,34],19:[2,34],22:[2,34],24:[2,34],25:[2,34],26:[2,34],27:[2,34],28:[2,34],29:[2,34],30:[2,34],31:[2,34],32:[2,34],33:[2,34],34:[2,34],35:[2,34],36:[2,34],37:[2,34],39:[2,34],40:[2,34],41:[2,34]},{11:74,16:[1,15],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{4:75,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{7:21,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],23:[1,76],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,8]},{6:[2,6]},{9:[1,77]},{6:[2,14],17:[1,32],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[1,33],32:[1,34],33:[1,35],34:[1,36],35:[1,37]},{6:[2,33],8:[2,33],10:[2,33],14:[2,33],15:[2,33],16:[2,33],17:[2,33],18:[2,33],19:[2,33],22:[2,33],24:[2,33],25:[2,33],26:[2,33],27:[2,33],28:[2,33],29:[2,33],30:[2,33],31:[2,33],32:[2,33],33:[2,33],34:[2,33],35:[2,33],36:[2,33],37:[2,33],39:[2,33],40:[2,33],41:[2,33]},{6:[2,38],8:[2,38],10:[2,38],14:[2,38],15:[2,38],16:[2,38],17:[2,38],18:[2,38],19:[2,38],22:[2,38],24:[2,38],25:[2,38],26:[1,27],27:[1,28],28:[1,29],29:[1,30],30:[1,31],31:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],37:[2,38],39:[2,38],40:[2,38],41:[2,38]},{7:21,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],20:[1,78],21:[1,79],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,17]},{6:[2,7]},{6:[2,15]},{4:80,6:[1,3],7:4,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{7:21,8:[1,5],10:[1,6],11:7,12:8,13:9,14:[1,10],15:[1,11],16:[1,15],18:[1,18],20:[1,81],22:[1,19],24:[1,12],25:[1,13],36:[1,14],39:[1,16],40:[1,17]},{6:[2,16]}],
defaultActions: {8:[2,11],9:[2,12],20:[2,1],26:[2,9],38:[2,13],48:[2,5],69:[2,8],70:[2,6],76:[2,17],77:[2,7],78:[2,15],81:[2,16]},
parseError: function parseError(str, hash) {
    throw new Error(str);
},
parse: function parse(input) {
    var self = this,
        stack = [0],
        vstack = [null], // semantic value stack
        lstack = [], // location stack
        table = this.table,
        yytext = '',
        yylineno = 0,
        yyleng = 0,
        recovering = 0,
        TERROR = 2,
        EOF = 1;

    //this.reductionCount = this.shiftCount = 0;

    this.lexer.setInput(input);
    this.lexer.yy = this.yy;
    this.yy.lexer = this.lexer;
    if (typeof this.lexer.yylloc == 'undefined')
        this.lexer.yylloc = {};
    var yyloc = this.lexer.yylloc;
    lstack.push(yyloc);

    if (typeof this.yy.parseError === 'function')
        this.parseError = this.yy.parseError;

    function popStack (n) {
        stack.length = stack.length - 2*n;
        vstack.length = vstack.length - n;
        lstack.length = lstack.length - n;
    }

    function lex() {
        var token;
        token = self.lexer.lex() || 1; // $end = 1
        // if token isn't its numeric value, convert
        if (typeof token !== 'number') {
            token = self.symbols_[token] || token;
        }
        return token;
    };

    var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
    while (true) {
        // retreive state number from top of stack
        state = stack[stack.length-1];

        // use default actions if available
        if (this.defaultActions[state]) {
            action = this.defaultActions[state];
        } else {
            if (symbol == null)
                symbol = lex();
            // read action for current state and first input
            action = table[state] && table[state][symbol];
        }

        // handle parse error
        if (typeof action === 'undefined' || !action.length || !action[0]) {

            if (!recovering) {
                // Report error
                expected = [];
                for (p in table[state]) if (this.terminals_[p] && p > 2) {
                    expected.push("'"+this.terminals_[p]+"'");
                }
                var errStr = '';
                if (this.lexer.showPosition) {
                    errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+'\nExpecting '+expected.join(', ');
                } else {
                    errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
                                  (symbol == 1 /*EOF*/ ? "end of input" :
                                              ("'"+(this.terminals_[symbol] || symbol)+"'"));
                }
                this.parseError(errStr,
                    {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
            }

            // just recovered from another error
            if (recovering == 3) {
                if (symbol == EOF) {
                    throw new Error(errStr || 'Parsing halted.');
                }

                // discard current lookahead and grab another
                yyleng = this.lexer.yyleng;
                yytext = this.lexer.yytext;
                yylineno = this.lexer.yylineno;
                yyloc = this.lexer.yylloc;
                symbol = lex();
            }

            // try to recover from error
            while (1) {
                // check for error recovery rule in this state
                if ((TERROR.toString()) in table[state]) {
                    break;
                }
                if (state == 0) {
                    throw new Error(errStr || 'Parsing halted.');
                }
                popStack(1);
                state = stack[stack.length-1];
            }

            preErrorSymbol = symbol; // save the lookahead token
            symbol = TERROR;         // insert generic error symbol as new lookahead
            state = stack[stack.length-1];
            action = table[state] && table[state][TERROR];
            recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
        }

        // this shouldn't happen, unless resolve defaults are off
        if (action[0] instanceof Array && action.length > 1) {
            throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
        }

        switch (action[0]) {

            case 1: // shift
                //this.shiftCount++;

                stack.push(symbol);
                vstack.push(this.lexer.yytext);
                lstack.push(this.lexer.yylloc);
                stack.push(action[1]); // push state
                symbol = null;
                if (!preErrorSymbol) { // normal execution/no error
                    yyleng = this.lexer.yyleng;
                    yytext = this.lexer.yytext;
                    yylineno = this.lexer.yylineno;
                    yyloc = this.lexer.yylloc;
                    if (recovering > 0)
                        recovering--;
                } else { // error just occurred, resume old lookahead f/ before error
                    symbol = preErrorSymbol;
                    preErrorSymbol = null;
                }
                break;

            case 2: // reduce
                //this.reductionCount++;

                len = this.productions_[action[1]][1];

                // perform semantic action
                yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
                // default location, uses first token for firsts, last for lasts
                yyval._$ = {
                    first_line: lstack[lstack.length-(len||1)].first_line,
                    last_line: lstack[lstack.length-1].last_line,
                    first_column: lstack[lstack.length-(len||1)].first_column,
                    last_column: lstack[lstack.length-1].last_column
                };
                r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);

                if (typeof r !== 'undefined') {
                    return r;
                }

                // pop off stack
                if (len) {
                    stack = stack.slice(0,-1*len*2);
                    vstack = vstack.slice(0, -1*len);
                    lstack = lstack.slice(0, -1*len);
                }

                stack.push(this.productions_[action[1]][0]);    // push nonterminal (reduce)
                vstack.push(yyval.$);
                lstack.push(yyval._$);
                // goto new state = table[STATE][NONTERMINAL]
                newState = table[stack[stack.length-2]][stack[stack.length-1]];
                stack.push(newState);
                break;

            case 3: // accept
                return true;
        }

    }

    return true;
}};/* Jison generated lexer */
var lexer = (function(){var lexer = ({EOF:1,
parseError:function parseError(str, hash) {
        if (this.yy.parseError) {
            this.yy.parseError(str, hash);
        } else {
            throw new Error(str);
        }
    },
setInput:function (input) {
        this._input = input;
        this._more = this._less = this.done = false;
        this.yylineno = this.yyleng = 0;
        this.yytext = this.matched = this.match = '';
        this.conditionStack = ['INITIAL'];
        this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
        return this;
    },
input:function () {
        var ch = this._input[0];
        this.yytext+=ch;
        this.yyleng++;
        this.match+=ch;
        this.matched+=ch;
        var lines = ch.match(/\n/);
        if (lines) this.yylineno++;
        this._input = this._input.slice(1);
        return ch;
    },
unput:function (ch) {
        this._input = ch + this._input;
        return this;
    },
more:function () {
        this._more = true;
        return this;
    },
pastInput:function () {
        var past = this.matched.substr(0, this.matched.length - this.match.length);
        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
    },
upcomingInput:function () {
        var next = this.match;
        if (next.length < 20) {
            next += this._input.substr(0, 20-next.length);
        }
        return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
    },
showPosition:function () {
        var pre = this.pastInput();
        var c = new Array(pre.length + 1).join("-");
        return pre + this.upcomingInput() + "\n" + c+"^";
    },
next:function () {
        if (this.done) {
            return this.EOF;
        }
        if (!this._input) this.done = true;

        var token,
            match,
            col,
            lines;
        if (!this._more) {
            this.yytext = '';
            this.match = '';
        }
        var rules = this._currentRules();
        for (var i=0;i < rules.length; i++) {
            match = this._input.match(this.rules[rules[i]]);
            if (match) {
                lines = match[0].match(/\n.*/g);
                if (lines) this.yylineno += lines.length;
                this.yylloc = {first_line: this.yylloc.last_line,
                               last_line: this.yylineno+1,
                               first_column: this.yylloc.last_column,
                               last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
                this.yytext += match[0];
                this.match += match[0];
                this.matches = match;
                this.yyleng = this.yytext.length;
                this._more = false;
                this._input = this._input.slice(match[0].length);
                this.matched += match[0];
                token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
                if (token) return token;
                else return;
            }
        }
        if (this._input === "") {
            return this.EOF;
        } else {
            this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), 
                    {text: "", token: null, line: this.yylineno});
        }
    },
lex:function lex() {
        var r = this.next();
        if (typeof r !== 'undefined') {
            return r;
        } else {
            return this.lex();
        }
    },
begin:function begin(condition) {
        this.conditionStack.push(condition);
    },
popState:function popState() {
        return this.conditionStack.pop();
    },
_currentRules:function _currentRules() {
        return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
    }});
lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {

var YYSTATE=YY_START
switch($avoiding_name_collisions) {
case 0:
break;
case 1:return 6;
break;
case 2:return 24;
break;
case 3:return 26;
break;
case 4:return 27;
break;
case 5:return 28;
break;
case 6:return 29;
break;
case 7:return 30;
break;
case 8:return 36;
break;
case 9:return 37;
break;
case 10:return 41;
break;
case 11:return 33;
break;
case 12:return 34;
break;
case 13:return 35;
break;
case 14:return 31;
break;
case 15:return 32;
break;
case 16:return 17;
break;
case 17:return 25;
break;
case 18:return 8;
break;
case 19:return 20;
break;
case 20:return 23;
break;
case 21:return 9;
break;
case 22:return 39;
break;
case 23:return 40;
break;
case 24:return 'SELECT';
break;
case 25:return 22;
break;
case 26:return 18;
break;
case 27:return 19;
break;
case 28:return 21;
break;
case 29:return 14;
break;
case 30:return 15;
break;
case 31:return 16;
break;
case 32:return 10;
break;
case 33:return 5;
break;
}
};
lexer.rules = [/^[ 	]+/,/^[\n\r;]+/,/^[0-9]+/,/^\+/,/^\./,/^\-/,/^\*/,/^\//,/^\(/,/^\)/,/^,/,/^>=/,/^<=/,/^<>/,/^>/,/^</,/^=/,/^"[^"]*"/,/^BEGIN/,/^ENDIF/,/^WEND/,/^END/,/^INPUT/,/^PRINT/,/^SELECT/,/^WHILE/,/^IF/,/^THEN/,/^ELSE/,/^GOTO/,/^LET/,/^[a-zA-Z][a-zA-Z0-9]*/,/^@[a-zA-Z][a-zA-Z0-9]*/,/^$/];
lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"inclusive":true}};return lexer;})()
parser.lexer = lexer;
return parser;
})();
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
exports.parser = parser;
exports.parse = function () { return parser.parse.apply(parser, arguments); }
exports.main = function commonjsMain(args) {
    if (!args[1])
        throw new Error('Usage: '+args[0]+' FILE');
    if (typeof process !== 'undefined') {
        var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8");
    } else {
        var cwd = require("file").path(require("file").cwd());
        var source = cwd.join(args[1]).read({charset: "utf-8"});
    }
    return exports.parser.parse(source);
}
if (typeof module !== 'undefined' && require.main === module) {
  exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
}
}